{% extends "comments/view_document.html" %}

{% load i18n %}

{% block comments %}
<div class='comments'>

	{% if results %}
		<p class='comments-title'>{% trans "Comments"%}</p>
	
	{% for comment in results %}
		<hr/>
		<span class='comment-added-by'>{% trans "Added by"%}: {{comment.author}}</span><br/>
		<span class='comment-subject'>{% trans "Subject"%}: {{comment.subject}}</span><br/>
		<p class='comment-comment'>{{comment.comment|linebreaks}}</p>
	{% endfor %}
	{% endif %}
	{% if is_colaborator %}
		<p class='addcomment-title'>{% trans "Add a comment"%}</p>
		<form action="comments" method="post">
            <label for="add_subject">{% trans "Subject" %}</label>
            <input type="text" name="add_subject" id="add_subject"/>
            <br/>
            <label for="add_comment">{% trans "Comment" %}</label>
            <textarea id="add_comment" rows="10" cols="40" name="comment"></textarea>
            <input type="hidden" name="adding_comment" id="adding_comment" value="True"/>
            <input type="submit" value="{% trans 'Comment' %}" class="boton_1"/>
        </form>
    {% endif %}    
</div>
{% endblock %}
